%[x,y]=meshgrid(1:1:25,1:1:100);
I=zeros(50,200);

for i=1:50
    for j=1:50
        for k=1:50
            for l=1:50
                if(i~=k && j~=l)
                    if((i-k)*(l-j)>0)
                        %if(i<=k)
                            d1=k-i;
                            d2=j-l;
                            %r = (k-i)/(j-l);
                            ry = d1/(d1+d2);
                            xcoord = i+ry*(j-i);
                            ycoord = 200*ry;
                            if(xcoord < 1)
                                xcoord = 1
                            end
                            if(xcoord > 50)
                                xcoord = 50
                            end
                            if(ycoord < 1)
                                ycoord = 1
                            end
                            if(ycoord > 200)
                                ycoord = 200
                            end
                            I(floor(xcoord),floor(ycoord)) = I(floor(xcoord),floor(ycoord))+1;
                    end
                end
            end
        end
    end
end

imshow(I,[])